Release 10.1A: OpenEdge Development:
Web Services
Defining TABLE (static temp-table) parameters
TABLEparameters pass data only, because the static temp-table schema is known at WSDL generation. Progress 4GL Web services map aTABLEdefinition to a<complexType>consisting of a<sequence>of elements that represent a row (Progress record). Each<element>in this sequence represents a column (Progress field) of the row. For all SOAP formats, aTABLEparameter is defined as a<complexType>that references the corresponding row element<complexType>.Client-development toolkits typically define an object for every
<complexType>representing a temp-table row. The client application then creates the TABLE parameter by creating an array of temp-table row object instances.The following examples show some
<complexType>definitions forTABLErows and parameters.The following WSDL sample defines a
TABLErow named,staticTT_ttEmpRow, with two columns,NameandNumber:
The following WSDL sample defines a temp-table parameter for the
ttEmprow using the RPC/Encoded SOAP format. Note that the parameter is a SOAP array of rows:
The following WSDL sample defines a
TABLEparameter using the RPC/Literal or Document/Literal SOAP formats. Note that the parameter is a sequence of multiple rows:
For these SOAP formats, the row element name (
ttEmpRow) is used to identify each element that holds a data row sent in SOAP messages that pass aTABLEparameter.Following are general formats for
TABLEparameters in SOAP messages. For an RPC/Encoded Web service, theTABLEparameter is represented as a SOAP array ofTABLErows, where each row is encapsulated by an<Item>element:
In RPC/Encoded SOAP messages passing
TABLEparameters, you might notice XML like this:
Some client toolkits use the SOAP encoding
hrefattribute to reference the data in a SOAP array for a given row instance at a different location in the message (indicated by theidattribute with the corresponding value). The WSA, however, does not use this indirect form of data reference forTABLEparameters in RPC/Encoded SOAP messages.For an RPC/Literal or Document/Literal Web service, the
TABLEparameter is represented as a<sequence>ofTABLErow elements. Each element is named after the row<element>in the<complexType>used to define theTABLErow for the parameter. This WSDL-named row<element>corresponds to the<Item>element used to represent SOAP array rows in RPC/Encoded Web services.Thus, using the sample row element named
ttEmpRow, a SOAP message contains aTABLEparameter for this row definition in the following form:
Each column of a
TABLErow can hold any data type shown in Table 4–3.
Table 4–3: XML data types for TABLE (static temp-table) parameter columns Progress 4GL data type XML Schema data type BLOB1 CLOB1INTEGER(32 bit)RECID(32 or 64 bit)
1BLOBandCLOBdata types are designed to support very large objects. Use of these data types for table fields in Web services can result in a serious performance impact.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |